package com.mew.common.entity.game;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.mew.common.util.NumberUtil;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

/**
 * <p>
 * 
 * </p>
 *
 * @author SK123
 * @since 2020-11-20
 */
@TableName("g_room_profile")
@Data
@ToString
@NoArgsConstructor
public class RoomProfile {

    @TableId("room_id")
    private Integer roomId;

    @TableField("room_type")
    private Integer roomType;

    @TableField("play_total")
    private Long playTotal;

    @TableField("bet_total")
    private Long betTotal;

    @TableField("payment_total")
    private Long paymentTotal;

    @TableField("jackpot_value")
    private Long jackpotValue;
    /**
     * 返奖率  1000
     * @return
     */
    public int award(){
        return NumberUtil.proportion(this.getPaymentTotal(), this.getBetTotal(), 1000);
    }

}
